package com.lumyc.springbootaop.controller;

import com.lumyc.springbootaop.annotation.LogTrace;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName HelloController
 * @Description TODO
 * @Author lumyc
 * @Date 2023/2/23 9:43
 * @Version 1.0
 */
@RestController
public class HelloController {

    @GetMapping("/hello")
    public String hello(@RequestParam("name") String name){
        System.out.println("hello"+ " " +name);
        return "hello"+ " " +name;
    }

    @GetMapping("/hello1")
    public String hello1(@RequestParam("name") String name){
        System.out.println("hello1"+ " " +name );
        return "hello1"+ " " +name ;
    }

    @GetMapping("/hello2")
    @LogTrace(false)
    public String hello2(@RequestParam("name") String name){
        System.out.println("hello2"+ " " +name);
        return "hello2"+ " " +name;
    }
}
